#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

int g_unval;
int g_val = 100;
int main(int argc,char* argv[],char* env[])
{
 //printf("code addr:%p\n",main);
  //printf("init data addr:%p\n",&g_val);//已初始
  //printf("uninit data addr:%p\n");
  char *heap1 = (char*)malloc(20);
  char *heap2 = (char*)malloc(20);
  char *heap3 = (char*)malloc(20);
  printf("heap1 addr:%p\n",heap1);//堆
  printf("heap2 addr:%p\n",heap2);
  printf("heap3 addr:%p\n",heap3);
  printf("stack1 addr:%p\n",&heap1);//栈
  printf("stack2 addr:%p\n",&heap2);
  printf("stack3 addr:%p\n",&heap3);
  for(int i=0;argv[i];i++)
  {
    printf("argv[%d]=%p\n",i,argv[i]);
  }
  for(int i=0;env[i];i++)
  {
    printf("env[%d]=%p\n",i,env[i]);                                                                                                                                                                      
 }
  return 0;
}

